package com.ft.turorial.spring.boot.listener;

import javax.servlet.annotation.WebListener;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

@WebListener
public class MyHttpSessionListenerByScanWebListener implements HttpSessionListener {

	@Override
	public void sessionCreated(HttpSessionEvent event) {
		System.out.println("Session 被创建");
		System.out.println(this.getClass()+"->"+event.getSession().getServletContext().getServerInfo());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent event) {
		System.out.println("Session 被销毁");
		System.out.println(this.getClass()+"->"+event.getSession().getServletContext().getServerInfo());
	}

}
